﻿using Core;
using Core.Domain.Customers;
using System.Collections.Generic;
namespace Services.Customers
{
    /// <summary>
    /// 简历服务接口
    /// </summary>
    public partial interface IResumeService
    {
        #region 简历
        /// <summary>
        /// 删除简历
        /// </summary>
        /// <param name="entity"></param>
        void DeleteResume(Resume entity);

        /// <summary>
        /// 新增简历
        /// </summary>
        /// <param name="entity"></param>
        void InsertResume(Resume entity);

        /// <summary>
        /// 更新简历
        /// </summary>
        /// <param name="entity"></param>
        void UpdateResume(Resume entity);

        /// <summary>
        /// 根据主键获取简历
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        Resume GetResumeById(int resumeId);

        /// <summary>
        /// 根据主键集合获取简历
        /// </summary>
        /// <param name="resumeIds"></param>
        /// <returns></returns>
        IList<Resume> GetResumeByIds(int[] resumeIds);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <returns></returns>
        IPagedList<Resume> GetResumes(string name = "", 
            int sex = -1, int workYear = 0,
            string phone = "", string mail = "",
            int cityId = 0, int workStateId = 0, int workCityId = 0,
            bool? deleted = null, bool? active = null, 
            ResumeSortingEnum orderby = ResumeSortingEnum.DisplayOrderDown,
            int pageIndex = 0, int pageSize = int.MaxValue);
        #endregion

        #region 教育背景
        /// <summary>
        /// 删除教育背景
        /// </summary>
        /// <param name="entity"></param>
        void DeleteEducation(Education entity);
        /// <summary>
        /// 更新教育背景
        /// </summary>
        /// <param name="entity"></param>
        void UpdateEducation(Education entity);
        /// <summary>
        /// 插入教育背景
        /// </summary>
        /// <param name="entity"></param>
        void InsertEducation(Education entity);
        /// <summary>
        /// 根据主键获取教育背景
        /// </summary>
        /// <param name="educationId"></param>
        /// <returns></returns>
        Education GetEducationById(int educationId);
        /// <summary>
        /// 根据简历主键获取教育背景
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        IList<Education> GetEducationByResumeId(int resumeId);
        #endregion

        #region 工作经历
        /// <summary>
        /// 删除工作经历
        /// </summary>
        /// <param name="entity"></param>
        void DeleteWorkExperience(WorkExperience entity);
        /// <summary>
        /// 更新工作经历
        /// </summary>
        /// <param name="entity"></param>
        void UpdateWorkExperience(WorkExperience entity);

        /// <summary>
        ///  插入工作经历
        /// </summary>
        /// <param name="entity"></param>
        void InsertWorkExperience(WorkExperience entity);

        /// <summary>
        /// 根据主键获取工作经历
        /// </summary>
        /// <param name="workExperienceId"></param>
        /// <returns></returns>
        WorkExperience GetWorkExperienceById(int workExperienceId);

        /// <summary>
        /// 根据简历Id获取工作经历
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        IList<WorkExperience> GetWorkExperienceByResumeId(int resumeId);
        #endregion
    }
}
